package com.zm.campus.util;

import com.zm.campus.exceptions.GlobalException;
import com.zm.campus.pojo.RespBeanEnum;


/**
 * 校验类
 */
public class AssertUtil {
    /**
     * 判断条件是否满足
     *  如果条件满足，则抛出参数异常
     * @param flag
     * @param msg
     * @return void
     */
    public  static void isTrue(Boolean flag, RespBeanEnum msg){
        if(flag){
            throw  new GlobalException(msg);
        }
    }

}
